<?php
	// 加载公共文件
	include_once('../../public/config/config.php');
	include_once('../../public/config/sql.php');

	// 实例化对象
	$obj = new sql($info);

	// 接收post传值
	$users    =  isset($_POST['users']) ? $_POST['users'] : '';
	$rank     =  isset($_POST['rank']) ? $_POST['rank'] : '';
	$pass     =  isset($_POST['passOne']) ? md5($_POST['passOne']) : '';
	$content  =  isset($_POST['content']) ? $_POST['content'] : '';
	$state    =  isset($_POST['state']) ? $_POST['state'] : '';

	// 构建sql语句
	$sql = "insert into administrator(username,password,rank,content,state) values('$users','$pass','$rank','$content','$state')";

	if($obj->db_insert($sql)){

		header('location:../delayJump.php?param=administrator_list');
	}else{

		header('location:../index.php?param=administrator_list');
	}

?>